﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Service.Core
{
    public class ServiceResult
    {
        public string errorMsg { get; set; }
        public int errorCode { get; set; }
        public bool isOperationSuccess { get; set; }
        public object dbReturningState { get; set; }
        public T GetState<T>()
        {
            return (T)dbReturningState;
        }
        public ServiceResult()
        {
            this.isOperationSuccess = true;
            errorMsg = "no error";
            errorCode = ServiceResultErrorCodes.ERR_CODE_NO_ERROR;
        }
    }
}
